package com.ray.consumer.controller;

import com.ray.consumer.service.UserServiceImpl;
import com.ray.entity.User;
import com.ray.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class OrderController {
    @Autowired
    UserServiceImpl userService;

    @RequestMapping("/findById")
    @ResponseBody
    public User findById(@RequestParam("userId") Integer id){
        return userService.selectUserByOrderId(id);
    }
}
